package cn.falconnect.adserver.adapter.persistence.dao;

import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import cn.falconnect.adserver.domain.ad.GeoState;

@Component
public interface GeoStateDao {
	
		@Results(value = { @Result(column = "id", property = "id", id = true),
			@Result(column = "country_id", property = "countryId"),
			@Result(column = "district_id", property = "districtId"),
			@Result(column = "update_time", property = "updateTime"),
			@Result(column = "full_name", property = "fullName"),
			@Result(column = "english_name", property = "englishName") })
		@Select("select * from geo_state ")
		public GeoState findAll();
		
		@Results(value = { @Result(column = "id", property = "id", id = true),
				@Result(column = "country_id", property = "countryId"),
				@Result(column = "district_id", property = "districtId"),
				@Result(column = "update_time", property = "updateTime"),
				@Result(column = "full_name", property = "fullName"),
				@Result(column = "english_name", property = "englishName") })
		@Select("select * from geo_state where id = #{value}")
		public GeoState findById(long id);
		
	
}
